﻿using Keyki.NefClass.Kernel.Fuzzy.FuzzySet;

namespace Keyki.NefClass.Kernel.Fuzzy.Rulles
{
	public class LinguisticVariable
	{
		public LinguisticVariable(string name, AbstractFuzzySet fuzzySet)
		{
			Name = name;
			FuzzySet = fuzzySet;
			Low = double.NaN;
			High = double.NaN;
		}//LinguisticVariable

		public AbstractFuzzySet FuzzySet { get; set; }

		public string Name { get; set; }

		public double High { get; set; }

		public double Low { get; set; }

		public override bool Equals(object obj)
		{
			if (!(obj is LinguisticVariable))
				return false;

			var ling = (LinguisticVariable) obj;

			return FuzzySet.Equals(ling.FuzzySet);
		}//Equals

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}
	}

//LinguisticVariable
}